home *** CD-ROM | disk | FTP | other *** search
- Path: news.mel.connect.com.au!news
- From: Igor <igrossma@ais.com.au>
- Newsgroups: comp.lang.c++
- Subject: operator news overload
- Date: 26 Jan 1996 09:10:37 GMT
- Organization: Connect.com.au P/L
- Message-ID: <4ea5qd$9fl@perki.connect.com.au>
- NNTP-Posting-Host: 203.12.86.16
-
- Could any one tell me how I can overload an operator new ,that it will work like that:
- main ()
- {
- int *i=new int;
- circle *c= new circle;
- }
-
- In case store is exhausted it should print out:
- " Can't allocate new int"
- or
- "Can't allocate new circle"
-
- depend on type to be allocated.
-
- Thanks a lot.
- Igor Grossman
- igrossma@ais.com.au
-
-